<template>
  <div class="username">
    <div class="mask" @click="$router.back()"></div>
    <div class="content">
      <div class="form">
        <yd-cell-group>
          <yd-cell-item>
            <xf-input
              :valid="[{required: true, msg: '请填写请填写组织机构代码'}]"
              v-model="form.name"
              ref="name"
              slot="right"
              v-focus
              class="input"
              placeholder="请填写组织机构代码"></xf-input>
            <mt-button type="primary" slot="right" size="small" @click="onSubmit">确定</mt-button>
          </yd-cell-item>
        </yd-cell-group>
      </div>
    </div>
  </div>
</template>
<script>
  import XfInput from '../../../components/xf-input/xf-input.vue'

  export default {
    components: {XfInput},
    data() {
      return {
        form: {
          name: ''
        }
      }
    },
    methods: {
      onSubmit() {
        this.$router.back()
      }
    }
  }
</script>
<style lang="scss" scoped>
  @import "../../../common/style/variable";
  .username{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .mask{
    background: rgba(0,0,0,.3);
    flex: 1;
  }
  .content{
    background: #fff;
  }
  .input{
    width: auto;
    flex: 1;
  }
</style>
